using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Manager : MonoBehaviour
{
    private static ResourceManager resource;
    public static ResourceManager Resource
    {
        get { return resource; }
    }

    private static LuaManager lua;
    public static LuaManager Lua
    {
        get { return lua; }
    }

    private static UIManager ui;
    public static UIManager UI
    {
        get { return ui; }
    }

    private static EntityManager entity;
    public static EntityManager Entity
    {
        get { return entity; }
    }

    private static MySceneManager scene;
    public static MySceneManager Scene
    {
        get { return scene; }
    }

    private static SoundManager sound;
    public static SoundManager Sound
    {
        get { return sound; }
    }

    private static EventManager _event;
    public static EventManager Event
    {
        get { return _event; }
    }

    private static PoolManager pool;
    public static PoolManager Pool
    {
        get { return pool; }
    }

    private void Awake()
    {
        resource = this.gameObject.AddComponent<ResourceManager>();
        lua = this.gameObject.AddComponent<LuaManager>();
        ui = this.gameObject.AddComponent<UIManager>();
        scene = this.gameObject.AddComponent<MySceneManager>();
        entity = this.gameObject.AddComponent<EntityManager>();
        sound = this.gameObject.AddComponent<SoundManager>();
        _event = this.gameObject.AddComponent<EventManager>();
        pool = this.gameObject.AddComponent<PoolManager>();
    }
}
